FROM centos:7
MAINTAINER game

ADD jdk1.7.0_71.tar.gz /usr/local
ADD apache-tomcat-6.0.36.tar.gz /usr/local

RUN yum -y install vim
WORKDIR /usr/local

ENV JAVA_HOME /usr/local/jdk1.7.0_71
ENV CLASSPATH $JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
ENV CATALINA_HOME /usr/local/apache-tomcat-6.0.36
ENV CATALINA_BASE /usr/local/apache-tomcat-6.0.36
ENV PATH $PATH:$JAVA_HOME/bin:$CATALINA_HOME/lib:$CATALINA_BASE/bin

EXPOSE 8877

CMD $CATALINA_BASE/bin/startup.sh && tail -f $CATALINA_BASE/logs/catalina.out